﻿<?xml version="1.0" encoding="utf-8"?>
<Recipe Name="CreateCRUDSp" xmlns="http://schemas.microsoft.com/pag/gax-core" xmlns:xi="http://www.w3.org/2001/XInclude" Bound="false">
  <DocumentationLinks>
    <Link Kind="Documentation" Caption="How to: Create Database Stored Procedures" Url="ms-help://MS.VSCC.v80/MS.VSIPCC.v80/ms.wssf.2006Dec/WSSF/html/10-080-How_to_Create_Stored_Procedures_to_Access_and_Modify_the_Database.htm" />
    <Link Kind="NextStep" Caption="Create Data Repository Classes" Url="recipe://CreateDataRepository" />
  </DocumentationLinks>
  <xi:include href="Common/CommonTypeAliases.xml" xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(/gax:Types)" />
  <Caption>Create CRUD stored procedures</Caption>
  <Description>Create CRUD stored procedures</Description>
  <HostData>
    <Icon ID="1549" />
    <CommandBar Menu="Project" />
  </HostData>
  <Arguments>
    <xi:include href="Common/CommonArguments.xml" xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(/gax:Arguments/gax:Argument)" />
    <Argument Name="DataAccessProject" Type="EnvDTE.Project, EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
      <Converter Type="ProjectConverter" />
      <ValueProvider Type="Microsoft.Practices.RecipeFramework.Extensions.ValueProviders.VisualStudio.CurrentProjectProvider, Microsoft.Practices.RecipeFramework.Extensions" />
    </Argument>
    <Argument Name="Tables" Type="System.Collections.ArrayList, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    <Argument Name="TableStoredProcedureMappings" Type="System.Collections.ArrayList, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    <xi:include href="Common/CommonConnectionStringWizardPages.xml" xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(/gax:Recipe/gax:Arguments/gax:Argument)" />
    <Argument Name="StoredProcedures">
      <Converter Type="VsAddValidFileStringConverter" ProjectArgument="DataAccessProject" MonitorArgument="StoredProceduresFileName" />
    </Argument>
    <Argument Name="StoredProceduresFileName">
      <ValueProvider Type="Evaluator" Expression="$(StoredProcedures).sql">
        <MonitorArgument Name="StoredProcedures" />
      </ValueProvider>
    </Argument>
  </Arguments>
  <GatheringServiceData>
    <Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0" Help="ms-help://MS.VSCC.v80/MS.VSIPCC.v80/ms.wssf.2006Dec/WSSF/html/10-080-Create_Stored_Procedures_to_Access_and_Modify_the_Database.htm">
      <Pages>
        <xi:include href="Common/CommonConnectionStringWizardPages.xml" xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xmlns(gaxw=http://schemas.microsoft.com/pag/gax-wizards) xpointer(/gax:Recipe/gax:GatheringServiceData/gaxw:Wizard/gaxw:Pages/gaxw:Page)" />
        <!--<Page Type="Microsoft.Practices.RepositoryFactory.CustomPages.ConnectionCP, Microsoft.Practices.RepositoryFactory">
					<Title>Data tables properties</Title>
					<LinkTitle>Specify Tables</LinkTitle>
					<Help>Specify the tables that you want to create the stored procedures from.</Help>
				</Page>-->
        <Page Type="Microsoft.Practices.RepositoryFactory.CustomPages.SPTablesSelectorCP, Microsoft.Practices.RepositoryFactory">
          <Title>Data tables properties</Title>
          <LinkTitle>Specify tables</LinkTitle>
          <Help>Specify the tables that you want to create the stored procedures from.</Help>
        </Page>
        <Page Type="Microsoft.Practices.RepositoryFactory.CustomPages.SPsSelectorCP, Microsoft.Practices.RepositoryFactory" Height="440" Width="550">
          <Title>Stored procedures properties</Title>
          <LinkTitle>Specify stored procedures</LinkTitle>
          <Help>Specify the stored procedures that you want to create.</Help>
        </Page>
        <Page>
          <Title>Stored Procedures File</Title>
          <LinkTitle>Specify output</LinkTitle>
          <Help>Specify the stored procedures file name.</Help>
          <Fields>
            <Field Label="Stored Procedures File name" ValueName="StoredProcedures">
              <Tooltip>The stored procedures file name</Tooltip>
              <!--<Editor Type="Microsoft.Practices.RecipeFramework.Extensions.Editors.FileChooser, Microsoft.Practices.RecipeFramework.Extensions" 
                      Filter="sql files (*.sql) |*.sql"/>-->
            </Field>
            <Field Label="Full Stored Procedures File name" ValueName="StoredProceduresFileName" ReadOnly="true">
              <Tooltip>The stored procedures file name with extension.</Tooltip>
            </Field>
          </Fields>
        </Page>
      </Pages>
    </Wizard>
  </GatheringServiceData>
  <Actions>
    <xi:include href="Common/CreateCRUDSpAssets.xml" xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(/gax:Recipe/gax:Actions/gax:Action)" />
  </Actions>
</Recipe>